﻿<script type="text/javascript">
    $(function() {
        $("#ruku_chaxun_rijie").click(function() {
            //查询
            var riJieRiQi = $("#ruku_rijie_riqi").datebox('getValue');
            var zhandianStr = $("#ruku_zhandian_rijie").combobox('getValue');
            $("#ruku_rijie").datagrid("load", { zhandian: zhandianStr, chengzhongleixing: '入库物料', rijieriqi: riJieRiQi, uid: window.uid, kid: window.kid });
        });
        $("#ruku_daochu_rijie").click(function() {
            //导出
            var riJieRiQi = $("#ruku_rijie_riqi").datebox('getValue');
            var zhandianStr = $("#ruku_zhandian_rijie").combobox('getValue').replace('#', '_');
            var yongHu = $("#currentUser").text();
            window.open(encodeURI("http://keaomds.com:10001/?uid=" + window.uid + "&kid=" + window.kid + "&requestType=5&keHuBianHao=" + window.kehubianhao + "&zhandian=" + zhandianStr + "&chengzhongleixing=入库物料&rijieriqi=" + riJieRiQi + "&yonghu=" + yongHu));
        });

        $("#ruku_zhandian_rijie").combobox({
            url: 'json/zhandian.json',
            method: 'get',
            valueField: 'zhandian',
            textField: 'zhandian',
            panelWidth: 175,
            panelHeight: 'auto',
            editable: false,
            onLoadSuccess: function() {
                $("#ruku_rijie").datagrid({ url: "handler/rijie.ashx", method: "get", queryParams: { zhandian: $("#ruku_zhandian_rijie").combobox('getValue'), chengzhongleixing: '入库物料', rijieriqi: $("#ruku_rijie_riqi").datebox('getValue'), uid: window.uid, kid: window.kid }, height: document.body.scrollHeight - 180 });
            }
        });


    });
    $.parser.onComplete = function() {
        var d = new Date();
        $("#ruku_rijie_riqi").datebox('setValue', d.toLocaleDateString());
    }
</script>

<div class="easyui-panel" data-options="height:90,border:false" title="数据检索" style="border-top-width: 0px;
    border-bottom-width: 1px; padding: 15px">
    <table style="font-size: 12px;">
        <tr>
           <td>
                站点：
            </td>
            <td>
                <input name="ruku_zhandian_rijie" id="ruku_zhandian_rijie" style="width: 175px;" />
            </td>
            <td>
                称重日期：
            </td>
            <td>
               <input id="ruku_rijie_riqi" type="text" class="easyui-datebox" data-options="required:true"
                    style="width:120px">
            </td>
            <td>
                <a id="ruku_chaxun_rijie" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                    style="width: 60px; margin-left: 20px;">查询</a>
            </td>
            <td>
                <a id="ruku_daochu_rijie" class="easyui-linkbutton" data-options="iconCls:'icon-export-16'"
                    style="width: 60px">导出</a>
            </td>
        </tr>
    </table>
</div>
<table id="ruku_rijie" class="easyui-datagrid" title="入库物资日结信息" data-options="border:false,singleSelect:true,collapsible:false,striped:true">
    <thead>
        <tr>
            <th data-options="field:'wuliaomingcheng',width:110">
                物料名称
            </th>
            <th data-options="field:'xinghao',width:100">
                型号
            </th>
            <th data-options="field:'maozhong',width:100,align:'right'">
                毛重(吨)
            </th>
            <th data-options="field:'pizhong',width:100,align:'right'">
                皮重(吨)
            </th>
            <th data-options="field:'kouzhong',width:100,align:'right'">
                扣重(吨)
            </th>
            <th data-options="field:'jingzhong',width:100,align:'right'">
                净重(吨)
            </th>
            <th data-options="field:'cheshu',width:100,align:'right'">
                车数(车)
            </th>
            <th data-options="field:'fahuozhongliang',width:100,align:'right'">
                发货(吨)
            </th>
            <th data-options="field:'jisuanfangliang',width:100,align:'right'">
                方量(方)
            </th>
        </tr>
    </thead>
</table>
